import { commonRequest } from '@/api/commonHttp';

// 价格中心 - 修改售价 - 关联商品列表查询
export const associatedQueryService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/associatedQuery',
  type: 'post',
  data,
  loadingFn
})

// 价格中心 - 修改售价 - 根据id查询售价表格数据回显
export const queryByIdsService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/queryByIds',
  type: 'post',
  data,
  loadingFn
})

// 价格中心 - 修改售价 - 高级查询
export const seniorQueryService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/seniorQuery',
  type: 'post',
  data,
  loadingFn
})

// 价格中心 - 修改售价 - 提交
export const commitService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/commit',
  type: 'post',
  data,
  loadingFn
})

// 价格中心 - 修改售价 - 售价导出
export const exportExcelService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/exportExcel',
  type: 'post',
  data,
  loadingFn,
  isExport: true
})

// 价格中心 - 修改售价 - 售价导入
export const importExcelUrl = 'sysback/salePrice/secondPhase/importExcel'

// 价格中心 - 修改售价 - 单据修改（修改表单管理-售价单据）- 单据查询（单据修改）
export const queryRecordDetailService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/queryRecordDetail',
  type: 'get',
  data,
  loadingFn
})

// 价格中心 - 修改售价 - 单据查看（修改表单管理-售价单据）- 单据分页查询（单据查看）
export const pagerQueryRecordDetailService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/pagerQueryRecordDetail',
  type: 'get',
  data,
  loadingFn
})

// 价格中心 - 修改售价 - 单据导出（修改表单管理-售价单据）- 售价单据导出
export const exportRecordDetailService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/exportRecordDetail',
  type: 'get',
  data,
  loadingFn,
  isExport: true
})
